if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.4",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.4",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.4",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.4",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-mp.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.4",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.4",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.4",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a(document.body).height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); (function(factory){ if(typeof define==="function"&&define.amd){ define([ "jquery" ], factory); }else{ factory(jQuery); }}(function($){ $.ui=$.ui||{}; $.extend($.ui, { version: "1.11.4", keyCode: { BACKSPACE: 8, COMMA: 188, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, LEFT: 37, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SPACE: 32, TAB: 9, UP: 38 }}); $.fn.extend({ scrollParent: function(includeHidden){ var position=this.css("position"), excludeStaticParent=position==="absolute", overflowRegex=includeHidden ? /(auto|scroll|hidden)/:/(auto|scroll)/, scrollParent=this.parents().filter(function(){ var parent=$(this); if(excludeStaticParent&&parent.css("position")==="static"){ return false; } return overflowRegex.test(parent.css("overflow") + parent.css("overflow-y") + parent.css("overflow-x")); }).eq(0); return position==="fixed"||!scrollParent.length ? $(this[ 0 ].ownerDocument||document):scrollParent; }, uniqueId: (function(){ var uuid=0; return function(){ return this.each(function(){ if(!this.id){ this.id="ui-id-" + ( ++uuid); }}); };})(), removeUniqueId: function(){ return this.each(function(){ if(/^ui-id-\d+$/.test(this.id)){ $(this).removeAttr("id"); }}); }}); function focusable(element, isTabIndexNotNaN){ var map, mapName, img, nodeName=element.nodeName.toLowerCase(); if("area"===nodeName){ map=element.parentNode; mapName=map.name; if(!element.href||!mapName||map.nodeName.toLowerCase()!=="map"){ return false; } img=$("img[usemap='#" + mapName + "']")[ 0 ]; return !!img&&visible(img); } return(/^(input|select|textarea|button|object)$/.test(nodeName) ? !element.disabled : "a"===nodeName ? element.href||isTabIndexNotNaN : isTabIndexNotNaN) && visible(element); } function visible(element){ return $.expr.filters.visible(element) && !$(element).parents().addBack().filter(function(){ return $.css(this, "visibility")==="hidden"; }).length; } $.extend($.expr[ ":" ], { data: $.expr.createPseudo ? $.expr.createPseudo(function(dataName){ return function(elem){ return !!$.data(elem, dataName); };}) : function(elem, i, match){ return !!$.data(elem, match[ 3 ]); }, focusable: function(element){ return focusable(element, !isNaN($.attr(element, "tabindex"))); }, tabbable: function(element){ var tabIndex=$.attr(element, "tabindex"), isTabIndexNaN=isNaN(tabIndex); return(isTabIndexNaN||tabIndex >=0)&&focusable(element, !isTabIndexNaN); }}); if(!$("").outerWidth(1).jquery){ $.each([ "Width", "Height" ], function(i, name){ var side=name==="Width" ? [ "Left", "Right" ]:[ "Top", "Bottom" ], type=name.toLowerCase(), orig={ innerWidth: $.fn.innerWidth, innerHeight: $.fn.innerHeight, outerWidth: $.fn.outerWidth, outerHeight: $.fn.outerHeight }; function reduce(elem, size, border, margin){ $.each(side, function(){ size -=parseFloat($.css(elem, "padding" + this))||0; if(border){ size -=parseFloat($.css(elem, "border" + this + "Width"))||0; } if(margin){ size -=parseFloat($.css(elem, "margin" + this))||0; }}); return size; } $.fn[ "inner" + name ]=function(size){ if(size===undefined){ return orig[ "inner" + name ].call(this); } return this.each(function(){ $(this).css(type, reduce(this, size) + "px"); }); }; $.fn[ "outer" + name]=function(size, margin){ if(typeof size!=="number"){ return orig[ "outer" + name ].call(this, size); } return this.each(function(){ $(this).css(type, reduce(this, size, true, margin) + "px"); }); };}); } if(!$.fn.addBack){ $.fn.addBack=function(selector){ return this.add(selector==null ? this.prevObject:this.prevObject.filter(selector) ); };} if($("").data("a-b", "a").removeData("a-b").data("a-b")){ $.fn.removeData=(function(removeData){ return function(key){ if(arguments.length){ return removeData.call(this, $.camelCase(key)); }else{ return removeData.call(this); }};})($.fn.removeData); } $.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()); $.fn.extend({ focus: (function(orig){ return function(delay, fn){ return typeof delay==="number" ? this.each(function(){ var elem=this; setTimeout(function(){ $(elem).focus(); if(fn){ fn.call(elem); }}, delay); }) : orig.apply(this, arguments); };})($.fn.focus), disableSelection: (function(){ var eventType="onselectstart" in document.createElement("div") ? "selectstart" : "mousedown"; return function(){ return this.bind(eventType + ".ui-disableSelection", function(event){ event.preventDefault(); }); };})(), enableSelection: function(){ return this.unbind(".ui-disableSelection"); }, zIndex: function(zIndex){ if(zIndex!==undefined){ return this.css("zIndex", zIndex); } if(this.length){ var elem=$(this[ 0 ]), position, value; while(elem.length&&elem[ 0 ]!==document){ position=elem.css("position"); if(position==="absolute"||position==="relative"||position==="fixed"){ value=parseInt(elem.css("zIndex"), 10); if(!isNaN(value)&&value!==0){ return value; }} elem=elem.parent(); }} return 0; }}); $.ui.plugin={ add: function(module, option, set){ var i, proto=$.ui[ module ].prototype; for(i in set){ proto.plugins[ i ]=proto.plugins[ i ]||[]; proto.plugins[ i ].push([ option, set[ i ] ]); }}, call: function(instance, name, args, allowDisconnected){ var i, set=instance.plugins[ name ]; if(!set){ return; } if(!allowDisconnected&&(!instance.element[ 0 ].parentNode||instance.element[ 0 ].parentNode.nodeType===11)){ return; } for(i=0; i < set.length; i++){ if(instance.options[ set[ i ][ 0 ] ]){ set[ i ][ 1 ].apply(instance.element, args); }} }}; var widget_uuid=0, widget_slice=Array.prototype.slice; $.cleanData=(function(orig){ return function(elems){ var events, elem, i; for(i=0; (elem=elems[i])!=null; i++){ try { events=$._data(elem, "events"); if(events&&events.remove){ $(elem).triggerHandler("remove"); }} catch(e){}} orig(elems); };})($.cleanData); $.widget=function(name, base, prototype){ var fullName, existingConstructor, constructor, basePrototype, proxiedPrototype={}, namespace=name.split(".")[ 0 ]; name=name.split(".")[ 1 ]; fullName=namespace + "-" + name; if(!prototype){ prototype=base; base=$.Widget; } $.expr[ ":" ][ fullName.toLowerCase() ]=function(elem){ return !!$.data(elem, fullName); }; $[ namespace ]=$[ namespace ]||{}; existingConstructor=$[ namespace ][ name ]; constructor=$[ namespace ][ name ]=function(options, element){ if(!this._createWidget){ return new constructor(options, element); } if(arguments.length){ this._createWidget(options, element); }}; $.extend(constructor, existingConstructor, { version: prototype.version, _proto: $.extend({}, prototype), _childConstructors: [] }); basePrototype=new base(); basePrototype.options=$.widget.extend({}, basePrototype.options); $.each(prototype, function(prop, value){ if(!$.isFunction(value)){ proxiedPrototype[ prop ]=value; return; } proxiedPrototype[ prop ]=(function(){ var _super=function(){ return base.prototype[ prop ].apply(this, arguments); }, _superApply=function(args){ return base.prototype[ prop ].apply(this, args); }; return function(){ var __super=this._super, __superApply=this._superApply, returnValue; this._super=_super; this._superApply=_superApply; returnValue=value.apply(this, arguments); this._super=__super; this._superApply=__superApply; return returnValue; };})(); }); constructor.prototype=$.widget.extend(basePrototype, { widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix||name):name }, proxiedPrototype, { constructor: constructor, namespace: namespace, widgetName: name, widgetFullName: fullName }); if(existingConstructor){ $.each(existingConstructor._childConstructors, function(i, child){ var childPrototype=child.prototype; $.widget(childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto); }); delete existingConstructor._childConstructors; }else{ base._childConstructors.push(constructor); } $.widget.bridge(name, constructor); return constructor; }; $.widget.extend=function(target){ var input=widget_slice.call(arguments, 1), inputIndex=0, inputLength=input.length, key, value; for(; inputIndex < inputLength; inputIndex++){ for(key in input[ inputIndex ]){ value=input[ inputIndex ][ key ]; if(input[ inputIndex ].hasOwnProperty(key)&&value!==undefined){ if($.isPlainObject(value)){ target[ key ]=$.isPlainObject(target[ key ]) ? $.widget.extend({}, target[ key ], value) : $.widget.extend({}, value); }else{ target[ key ]=value; }} }} return target; }; $.widget.bridge=function(name, object){ var fullName=object.prototype.widgetFullName||name; $.fn[ name ]=function(options){ var isMethodCall=typeof options==="string", args=widget_slice.call(arguments, 1), returnValue=this; if(isMethodCall){ this.each(function(){ var methodValue, instance=$.data(this, fullName); if(options==="instance"){ returnValue=instance; return false; } if(!instance){ return $.error("cannot call methods on " + name + " prior to initialization; " + "attempted to call method '" + options + "'"); } if(!$.isFunction(instance[options])||options.charAt(0)==="_"){ return $.error("no such method '" + options + "' for " + name + " widget instance"); } methodValue=instance[ options ].apply(instance, args); if(methodValue!==instance&&methodValue!==undefined){ returnValue=methodValue&&methodValue.jquery ? returnValue.pushStack(methodValue.get()) : methodValue; return false; }}); }else{ if(args.length){ options=$.widget.extend.apply(null, [ options ].concat(args)); } this.each(function(){ var instance=$.data(this, fullName); if(instance){ instance.option(options||{}); if(instance._init){ instance._init(); }}else{ $.data(this, fullName, new object(options, this)); }}); } return returnValue; };}; $.Widget=function(){}; $.Widget._childConstructors=[]; $.Widget.prototype={ widgetName: "widget", widgetEventPrefix: "", defaultElement: "
", options: { disabled: false, create: null }, _createWidget: function(options, element){ element=$(element||this.defaultElement||this)[ 0 ]; this.element=$(element); this.uuid=widget_uuid++; this.eventNamespace="." + this.widgetName + this.uuid; this.bindings=$(); this.hoverable=$(); this.focusable=$(); if(element!==this){ $.data(element, this.widgetFullName, this); this._on(true, this.element, { remove: function(event){ if(event.target===element){ this.destroy(); }} }); this.document=$(element.style ? element.ownerDocument : element.document||element); this.window=$(this.document[0].defaultView||this.document[0].parentWindow); } this.options=$.widget.extend({}, this.options, this._getCreateOptions(), options); this._create(); this._trigger("create", null, this._getCreateEventData()); this._init(); }, _getCreateOptions: $.noop, _getCreateEventData: $.noop, _create: $.noop, _init: $.noop, destroy: function(){ this._destroy(); this.element .unbind(this.eventNamespace) .removeData(this.widgetFullName) .removeData($.camelCase(this.widgetFullName)); this.widget() .unbind(this.eventNamespace) .removeAttr("aria-disabled") .removeClass(this.widgetFullName + "-disabled " + "ui-state-disabled"); this.bindings.unbind(this.eventNamespace); this.hoverable.removeClass("ui-state-hover"); this.focusable.removeClass("ui-state-focus"); }, _destroy: $.noop, widget: function(){ return this.element; }, option: function(key, value){ var options=key, parts, curOption, i; if(arguments.length===0){ return $.widget.extend({}, this.options); } if(typeof key==="string"){ options={}; parts=key.split("."); key=parts.shift(); if(parts.length){ curOption=options[ key ]=$.widget.extend({}, this.options[ key ]); for(i=0; i < parts.length - 1; i++){ curOption[ parts[ i ] ]=curOption[ parts[ i ] ]||{}; curOption=curOption[ parts[ i ] ]; } key=parts.pop(); if(arguments.length===1){ return curOption[ key ]===undefined ? null:curOption[ key ]; } curOption[ key ]=value; }else{ if(arguments.length===1){ return this.options[ key ]===undefined ? null:this.options[ key ]; } options[ key ]=value; }} this._setOptions(options); return this; }, _setOptions: function(options){ var key; for(key in options){ this._setOption(key, options[ key ]); } return this; }, _setOption: function(key, value){ this.options[ key ]=value; if(key==="disabled"){ this.widget() .toggleClass(this.widgetFullName + "-disabled", !!value); if(value){ this.hoverable.removeClass("ui-state-hover"); this.focusable.removeClass("ui-state-focus"); }} return this; }, enable: function(){ return this._setOptions({ disabled: false }); }, disable: function(){ return this._setOptions({ disabled: true }); }, _on: function(suppressDisabledCheck, element, handlers){ var delegateElement, instance=this; if(typeof suppressDisabledCheck!=="boolean"){ handlers=element; element=suppressDisabledCheck; suppressDisabledCheck=false; } if(!handlers){ handlers=element; element=this.element; delegateElement=this.widget(); }else{ element=delegateElement=$(element); this.bindings=this.bindings.add(element); } $.each(handlers, function(event, handler){ function handlerProxy(){ if(!suppressDisabledCheck && (instance.options.disabled===true || $(this).hasClass("ui-state-disabled"))){ return; } return(typeof handler==="string" ? instance[ handler ]:handler) .apply(instance, arguments); } if(typeof handler!=="string"){ handlerProxy.guid=handler.guid = handler.guid||handlerProxy.guid||$.guid++; } var match=event.match(/^([\w:-]*)\s*(.*)$/), eventName=match[1] + instance.eventNamespace, selector=match[2]; if(selector){ delegateElement.delegate(selector, eventName, handlerProxy); }else{ element.bind(eventName, handlerProxy); }}); }, _off: function(element, eventName){ eventName=(eventName||"").split(" ").join(this.eventNamespace + " ") + this.eventNamespace; element.unbind(eventName).undelegate(eventName); this.bindings=$(this.bindings.not(element).get()); this.focusable=$(this.focusable.not(element).get()); this.hoverable=$(this.hoverable.not(element).get()); }, _delay: function(handler, delay){ function handlerProxy(){ return(typeof handler==="string" ? instance[ handler ]:handler) .apply(instance, arguments); } var instance=this; return setTimeout(handlerProxy, delay||0); }, _hoverable: function(element){ this.hoverable=this.hoverable.add(element); this._on(element, { mouseenter: function(event){ $(event.currentTarget).addClass("ui-state-hover"); }, mouseleave: function(event){ $(event.currentTarget).removeClass("ui-state-hover"); }}); }, _focusable: function(element){ this.focusable=this.focusable.add(element); this._on(element, { focusin: function(event){ $(event.currentTarget).addClass("ui-state-focus"); }, focusout: function(event){ $(event.currentTarget).removeClass("ui-state-focus"); }}); }, _trigger: function(type, event, data){ var prop, orig, callback=this.options[ type ]; data=data||{}; event=$.Event(event); event.type=(type===this.widgetEventPrefix ? type : this.widgetEventPrefix + type).toLowerCase(); event.target=this.element[ 0 ]; orig=event.originalEvent; if(orig){ for(prop in orig){ if(!(prop in event)){ event[ prop ]=orig[ prop ]; }} } this.element.trigger(event, data); return !($.isFunction(callback) && callback.apply(this.element[0], [ event ].concat(data))===false || event.isDefaultPrevented()); }}; $.each({ show: "fadeIn", hide: "fadeOut" }, function(method, defaultEffect){ $.Widget.prototype[ "_" + method ]=function(element, options, callback){ if(typeof options==="string"){ options={ effect: options };} var hasOptions, effectName = !options ? method : options===true||typeof options==="number" ? defaultEffect : options.effect||defaultEffect; options=options||{}; if(typeof options==="number"){ options={ duration: options };} hasOptions = !$.isEmptyObject(options); options.complete=callback; if(options.delay){ element.delay(options.delay); } if(hasOptions&&$.effects&&$.effects.effect[ effectName ]){ element[ method ](options); }else if(effectName!==method&&element[ effectName ]){ element[ effectName ](options.duration, options.easing, callback); }else{ element.queue(function(next){ $(this)[ method ](); if(callback){ callback.call(element[ 0 ]); } next(); }); }};}); var widget=$.widget; var mouseHandled=false; $(document).mouseup(function(){ mouseHandled=false; }); var mouse=$.widget("ui.mouse", { version: "1.11.4", options: { cancel: "input,textarea,button,select,option", distance: 1, delay: 0 }, _mouseInit: function(){ var that=this; this.element .bind("mousedown." + this.widgetName, function(event){ return that._mouseDown(event); }) .bind("click." + this.widgetName, function(event){ if(true===$.data(event.target, that.widgetName + ".preventClickEvent")){ $.removeData(event.target, that.widgetName + ".preventClickEvent"); event.stopImmediatePropagation(); return false; }}); this.started=false; }, _mouseDestroy: function(){ this.element.unbind("." + this.widgetName); if(this._mouseMoveDelegate){ this.document .unbind("mousemove." + this.widgetName, this._mouseMoveDelegate) .unbind("mouseup." + this.widgetName, this._mouseUpDelegate); }}, _mouseDown: function(event){ if(mouseHandled){ return; } this._mouseMoved=false; (this._mouseStarted&&this._mouseUp(event)); this._mouseDownEvent=event; var that=this, btnIsLeft=(event.which===1), elIsCancel=(typeof this.options.cancel==="string"&&event.target.nodeName ? $(event.target).closest(this.options.cancel).length:false); if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){ return true; } this.mouseDelayMet = !this.options.delay; if(!this.mouseDelayMet){ this._mouseDelayTimer=setTimeout(function(){ that.mouseDelayMet=true; }, this.options.delay); } if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){ this._mouseStarted=(this._mouseStart(event)!==false); if(!this._mouseStarted){ event.preventDefault(); return true; }} if(true===$.data(event.target, this.widgetName + ".preventClickEvent")){ $.removeData(event.target, this.widgetName + ".preventClickEvent"); } this._mouseMoveDelegate=function(event){ return that._mouseMove(event); }; this._mouseUpDelegate=function(event){ return that._mouseUp(event); }; this.document .bind("mousemove." + this.widgetName, this._mouseMoveDelegate) .bind("mouseup." + this.widgetName, this._mouseUpDelegate); event.preventDefault(); mouseHandled=true; return true; }, _mouseMove: function(event){ if(this._mouseMoved){ if($.ui.ie&&(!document.documentMode||document.documentMode < 9)&&!event.button){ return this._mouseUp(event); }else if(!event.which){ return this._mouseUp(event); }} if(event.which||event.button){ this._mouseMoved=true; } if(this._mouseStarted){ this._mouseDrag(event); return event.preventDefault(); } if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){ this._mouseStarted = (this._mouseStart(this._mouseDownEvent, event)!==false); (this._mouseStarted ? this._mouseDrag(event):this._mouseUp(event)); } return !this._mouseStarted; }, _mouseUp: function(event){ this.document .unbind("mousemove." + this.widgetName, this._mouseMoveDelegate) .unbind("mouseup." + this.widgetName, this._mouseUpDelegate); if(this._mouseStarted){ this._mouseStarted=false; if(event.target===this._mouseDownEvent.target){ $.data(event.target, this.widgetName + ".preventClickEvent", true); } this._mouseStop(event); } mouseHandled=false; return false; }, _mouseDistanceMet: function(event){ return (Math.max(Math.abs(this._mouseDownEvent.pageX - event.pageX), Math.abs(this._mouseDownEvent.pageY - event.pageY) ) >=this.options.distance ); }, _mouseDelayMet: function(){ return this.mouseDelayMet; }, _mouseStart: function(){}, _mouseDrag: function(){}, _mouseStop: function(){}, _mouseCapture: function(){ return true; }}); (function(){ $.ui=$.ui||{}; var cachedScrollbarWidth, supportsOffsetFractions, max=Math.max, abs=Math.abs, round=Math.round, rhorizontal=/left|center|right/, rvertical=/top|center|bottom/, roffset=/[\+\-]\d+(\.[\d]+)?%?/, rposition=/^\w+/, rpercent=/%$/, _position=$.fn.position; function getOffsets(offsets, width, height){ return [ parseFloat(offsets[ 0 ]) *(rpercent.test(offsets[ 0 ]) ? width / 100:1), parseFloat(offsets[ 1 ]) *(rpercent.test(offsets[ 1 ]) ? height / 100:1) ]; } function parseCss(element, property){ return parseInt($.css(element, property), 10)||0; } function getDimensions(elem){ var raw=elem[0]; if(raw.nodeType===9){ return { width: elem.width(), height: elem.height(), offset: { top: 0, left: 0 }};} if($.isWindow(raw)){ return { width: elem.width(), height: elem.height(), offset: { top: elem.scrollTop(), left: elem.scrollLeft() }};} if(raw.preventDefault){ return { width: 0, height: 0, offset: { top: raw.pageY, left: raw.pageX }};} return { width: elem.outerWidth(), height: elem.outerHeight(), offset: elem.offset() };} $.position={ scrollbarWidth: function(){ if(cachedScrollbarWidth!==undefined){ return cachedScrollbarWidth; } var w1, w2, div=$("
"), innerDiv=div.children()[0]; $("body").append(div); w1=innerDiv.offsetWidth; div.css("overflow", "scroll"); w2=innerDiv.offsetWidth; if(w1===w2){ w2=div[0].clientWidth; } div.remove(); return (cachedScrollbarWidth=w1 - w2); }, getScrollInfo: function(within){ var overflowX=within.isWindow||within.isDocument ? "" : within.element.css("overflow-x"), overflowY=within.isWindow||within.isDocument ? "" : within.element.css("overflow-y"), hasOverflowX=overflowX==="scroll" || (overflowX==="auto"&&within.width < within.element[0].scrollWidth), hasOverflowY=overflowY==="scroll" || (overflowY==="auto"&&within.height < within.element[0].scrollHeight); return { width: hasOverflowY ? $.position.scrollbarWidth():0, height: hasOverflowX ? $.position.scrollbarWidth():0 };}, getWithinInfo: function(element){ var withinElement=$(element||window), isWindow=$.isWindow(withinElement[0]), isDocument = !!withinElement[ 0 ]&&withinElement[ 0 ].nodeType===9; return { element: withinElement, isWindow: isWindow, isDocument: isDocument, offset: withinElement.offset()||{ left: 0, top: 0 }, scrollLeft: withinElement.scrollLeft(), scrollTop: withinElement.scrollTop(), width: isWindow||isDocument ? withinElement.width():withinElement.outerWidth(), height: isWindow||isDocument ? withinElement.height():withinElement.outerHeight() };}}; $.fn.position=function(options){ if(!options||!options.of){ return _position.apply(this, arguments); } options=$.extend({}, options); var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, target=$(options.of), within=$.position.getWithinInfo(options.within), scrollInfo=$.position.getScrollInfo(within), collision=(options.collision||"flip").split(" "), offsets={}; dimensions=getDimensions(target); if(target[0].preventDefault){ options.at="left top"; } targetWidth=dimensions.width; targetHeight=dimensions.height; targetOffset=dimensions.offset; basePosition=$.extend({}, targetOffset); $.each([ "my", "at" ], function(){ var pos=(options[ this ]||"").split(" "), horizontalOffset, verticalOffset; if(pos.length===1){ pos=rhorizontal.test(pos[ 0 ]) ? pos.concat([ "center" ]) : rvertical.test(pos[ 0 ]) ? [ "center" ].concat(pos) : [ "center", "center" ]; } pos[ 0 ]=rhorizontal.test(pos[ 0 ]) ? pos[ 0 ]:"center"; pos[ 1 ]=rvertical.test(pos[ 1 ]) ? pos[ 1 ]:"center"; horizontalOffset=roffset.exec(pos[ 0 ]); verticalOffset=roffset.exec(pos[ 1 ]); offsets[ this ]=[ horizontalOffset ? horizontalOffset[ 0 ]:0, verticalOffset ? verticalOffset[ 0 ]:0 ]; options[ this ]=[ rposition.exec(pos[ 0 ])[ 0 ], rposition.exec(pos[ 1 ])[ 0 ] ]; }); if(collision.length===1){ collision[ 1 ]=collision[ 0 ]; } if(options.at[ 0 ]==="right"){ basePosition.left +=targetWidth; }else if(options.at[ 0 ]==="center"){ basePosition.left +=targetWidth / 2; } if(options.at[ 1 ]==="bottom"){ basePosition.top +=targetHeight; }else if(options.at[ 1 ]==="center"){ basePosition.top +=targetHeight / 2; } atOffset=getOffsets(offsets.at, targetWidth, targetHeight); basePosition.left +=atOffset[ 0 ]; basePosition.top +=atOffset[ 1 ]; return this.each(function(){ var collisionPosition, using, elem=$(this), elemWidth=elem.outerWidth(), elemHeight=elem.outerHeight(), marginLeft=parseCss(this, "marginLeft"), marginTop=parseCss(this, "marginTop"), collisionWidth=elemWidth + marginLeft + parseCss(this, "marginRight") + scrollInfo.width, collisionHeight=elemHeight + marginTop + parseCss(this, "marginBottom") + scrollInfo.height, position=$.extend({}, basePosition), myOffset=getOffsets(offsets.my, elem.outerWidth(), elem.outerHeight()); if(options.my[ 0 ]==="right"){ position.left -=elemWidth; }else if(options.my[ 0 ]==="center"){ position.left -=elemWidth / 2; } if(options.my[ 1 ]==="bottom"){ position.top -=elemHeight; }else if(options.my[ 1 ]==="center"){ position.top -=elemHeight / 2; } position.left +=myOffset[ 0 ]; position.top +=myOffset[ 1 ]; if(!supportsOffsetFractions){ position.left=round(position.left); position.top=round(position.top); } collisionPosition={ marginLeft: marginLeft, marginTop: marginTop }; $.each([ "left", "top" ], function(i, dir){ if($.ui.position[ collision[ i ] ]){ $.ui.position[ collision[ i ] ][ dir ](position, { targetWidth: targetWidth, targetHeight: targetHeight, elemWidth: elemWidth, elemHeight: elemHeight, collisionPosition: collisionPosition, collisionWidth: collisionWidth, collisionHeight: collisionHeight, offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], my: options.my, at: options.at, within: within, elem: elem }); }}); if(options.using){ using=function(props){ var left=targetOffset.left - position.left, right=left + targetWidth - elemWidth, top=targetOffset.top - position.top, bottom=top + targetHeight - elemHeight, feedback={ target: { element: target, left: targetOffset.left, top: targetOffset.top, width: targetWidth, height: targetHeight }, element: { element: elem, left: position.left, top: position.top, width: elemWidth, height: elemHeight }, horizontal: right < 0 ? "left":left > 0 ? "right":"center", vertical: bottom < 0 ? "top":top > 0 ? "bottom":"middle" }; if(targetWidth < elemWidth&&abs(left + right) < targetWidth){ feedback.horizontal="center"; } if(targetHeight < elemHeight&&abs(top + bottom) < targetHeight){ feedback.vertical="middle"; } if(max(abs(left), abs(right)) > max(abs(top), abs(bottom))){ feedback.important="horizontal"; }else{ feedback.important="vertical"; } options.using.call(this, props, feedback); };} elem.offset($.extend(position, { using: using })); }); }; $.ui.position={ fit: { left: function(position, data){ var within=data.within, withinOffset=within.isWindow ? within.scrollLeft:within.offset.left, outerWidth=within.width, collisionPosLeft=position.left - data.collisionPosition.marginLeft, overLeft=withinOffset - collisionPosLeft, overRight=collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, newOverRight; if(data.collisionWidth > outerWidth){ if(overLeft > 0&&overRight <=0){ newOverRight=position.left + overLeft + data.collisionWidth - outerWidth - withinOffset; position.left +=overLeft - newOverRight; }else if(overRight > 0&&overLeft <=0){ position.left=withinOffset; }else{ if(overLeft > overRight){ position.left=withinOffset + outerWidth - data.collisionWidth; }else{ position.left=withinOffset; }} }else if(overLeft > 0){ position.left +=overLeft; }else if(overRight > 0){ position.left -=overRight; }else{ position.left=max(position.left - collisionPosLeft, position.left); }}, top: function(position, data){ var within=data.within, withinOffset=within.isWindow ? within.scrollTop:within.offset.top, outerHeight=data.within.height, collisionPosTop=position.top - data.collisionPosition.marginTop, overTop=withinOffset - collisionPosTop, overBottom=collisionPosTop + data.collisionHeight - outerHeight - withinOffset, newOverBottom; if(data.collisionHeight > outerHeight){ if(overTop > 0&&overBottom <=0){ newOverBottom=position.top + overTop + data.collisionHeight - outerHeight - withinOffset; position.top +=overTop - newOverBottom; }else if(overBottom > 0&&overTop <=0){ position.top=withinOffset; }else{ if(overTop > overBottom){ position.top=withinOffset + outerHeight - data.collisionHeight; }else{ position.top=withinOffset; }} }else if(overTop > 0){ position.top +=overTop; }else if(overBottom > 0){ position.top -=overBottom; }else{ position.top=max(position.top - collisionPosTop, position.top); }} }, flip: { left: function(position, data){ var within=data.within, withinOffset=within.offset.left + within.scrollLeft, outerWidth=within.width, offsetLeft=within.isWindow ? within.scrollLeft:within.offset.left, collisionPosLeft=position.left - data.collisionPosition.marginLeft, overLeft=collisionPosLeft - offsetLeft, overRight=collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, myOffset=data.my[ 0 ]==="left" ? -data.elemWidth : data.my[ 0 ]==="right" ? data.elemWidth : 0, atOffset=data.at[ 0 ]==="left" ? data.targetWidth : data.at[ 0 ]==="right" ? -data.targetWidth : 0, offset=-2 * data.offset[ 0 ], newOverRight, newOverLeft; if(overLeft < 0){ newOverRight=position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset; if(newOverRight < 0||newOverRight < abs(overLeft)){ position.left +=myOffset + atOffset + offset; }}else if(overRight > 0){ newOverLeft=position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft; if(newOverLeft > 0||abs(newOverLeft) < overRight){ position.left +=myOffset + atOffset + offset; }} }, top: function(position, data){ var within=data.within, withinOffset=within.offset.top + within.scrollTop, outerHeight=within.height, offsetTop=within.isWindow ? within.scrollTop:within.offset.top, collisionPosTop=position.top - data.collisionPosition.marginTop, overTop=collisionPosTop - offsetTop, overBottom=collisionPosTop + data.collisionHeight - outerHeight - offsetTop, top=data.my[ 1 ]==="top", myOffset=top ? -data.elemHeight : data.my[ 1 ]==="bottom" ? data.elemHeight : 0, atOffset=data.at[ 1 ]==="top" ? data.targetHeight : data.at[ 1 ]==="bottom" ? -data.targetHeight : 0, offset=-2 * data.offset[ 1 ], newOverTop, newOverBottom; if(overTop < 0){ newOverBottom=position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; if(newOverBottom < 0||newOverBottom < abs(overTop)){ position.top +=myOffset + atOffset + offset; }}else if(overBottom > 0){ newOverTop=position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; if(newOverTop > 0||abs(newOverTop) < overBottom){ position.top +=myOffset + atOffset + offset; }} }}, flipfit: { left: function(){ $.ui.position.flip.left.apply(this, arguments); $.ui.position.fit.left.apply(this, arguments); }, top: function(){ $.ui.position.flip.top.apply(this, arguments); $.ui.position.fit.top.apply(this, arguments); }} }; (function(){ var testElement, testElementParent, testElementStyle, offsetLeft, i, body=document.getElementsByTagName("body")[ 0 ], div=document.createElement("div"); testElement=document.createElement(body ? "div":"body"); testElementStyle={ visibility: "hidden", width: 0, height: 0, border: 0, margin: 0, background: "none" }; if(body){ $.extend(testElementStyle, { position: "absolute", left: "-1000px", top: "-1000px" }); } for(i in testElementStyle){ testElement.style[ i ]=testElementStyle[ i ]; } testElement.appendChild(div); testElementParent=body||document.documentElement; testElementParent.insertBefore(testElement, testElementParent.firstChild); div.style.cssText="position: absolute; left: 10.7432222px;"; offsetLeft=$(div).offset().left; supportsOffsetFractions=offsetLeft > 10&&offsetLeft < 11; testElement.innerHTML=""; testElementParent.removeChild(testElement); })(); })(); var position=$.ui.position; var accordion=$.widget("ui.accordion", { version: "1.11.4", options: { active: 0, animate: {}, collapsible: false, event: "click", header: "> li > :first-child,> :not(li):even", heightStyle: "auto", icons: { activeHeader: "ui-icon-triangle-1-s", header: "ui-icon-triangle-1-e" }, activate: null, beforeActivate: null }, hideProps: { borderTopWidth: "hide", borderBottomWidth: "hide", paddingTop: "hide", paddingBottom: "hide", height: "hide" }, showProps: { borderTopWidth: "show", borderBottomWidth: "show", paddingTop: "show", paddingBottom: "show", height: "show" }, _create: function(){ var options=this.options; this.prevShow=this.prevHide=$(); this.element.addClass("ui-accordion ui-widget ui-helper-reset") .attr("role", "tablist"); if(!options.collapsible&&(options.active===false||options.active==null)){ options.active=0; } this._processPanels(); if(options.active < 0){ options.active +=this.headers.length; } this._refresh(); }, _getCreateEventData: function(){ return { header: this.active, panel: !this.active.length ? $():this.active.next() };}, _createIcons: function(){ var icons=this.options.icons; if(icons){ $("") .addClass("ui-accordion-header-icon ui-icon " + icons.header) .prependTo(this.headers); this.active.children(".ui-accordion-header-icon") .removeClass(icons.header) .addClass(icons.activeHeader); this.headers.addClass("ui-accordion-icons"); }}, _destroyIcons: function(){ this.headers .removeClass("ui-accordion-icons") .children(".ui-accordion-header-icon") .remove(); }, _destroy: function(){ var contents; this.element .removeClass("ui-accordion ui-widget ui-helper-reset") .removeAttr("role"); this.headers .removeClass("ui-accordion-header ui-accordion-header-active ui-state-default " + "ui-corner-all ui-state-active ui-state-disabled ui-corner-top") .removeAttr("role") .removeAttr("aria-expanded") .removeAttr("aria-selected") .removeAttr("aria-controls") .removeAttr("tabIndex") .removeUniqueId(); this._destroyIcons(); contents=this.headers.next() .removeClass("ui-helper-reset ui-widget-content ui-corner-bottom " + "ui-accordion-content ui-accordion-content-active ui-state-disabled") .css("display", "") .removeAttr("role") .removeAttr("aria-hidden") .removeAttr("aria-labelledby") .removeUniqueId(); if(this.options.heightStyle!=="content"){ contents.css("height", ""); }}, _setOption: function(key, value){ if(key==="active"){ this._activate(value); return; } if(key==="event"){ if(this.options.event){ this._off(this.headers, this.options.event); } this._setupEvents(value); } this._super(key, value); if(key==="collapsible"&&!value&&this.options.active===false){ this._activate(0); } if(key==="icons"){ this._destroyIcons(); if(value){ this._createIcons(); }} if(key==="disabled"){ this.element .toggleClass("ui-state-disabled", !!value) .attr("aria-disabled", value); this.headers.add(this.headers.next()) .toggleClass("ui-state-disabled", !!value); }}, _keydown: function(event){ if(event.altKey||event.ctrlKey){ return; } var keyCode=$.ui.keyCode, length=this.headers.length, currentIndex=this.headers.index(event.target), toFocus=false; switch(event.keyCode){ case keyCode.RIGHT: case keyCode.DOWN: toFocus=this.headers[(currentIndex + 1) % length ]; break; case keyCode.LEFT: case keyCode.UP: toFocus=this.headers[(currentIndex - 1 + length) % length ]; break; case keyCode.SPACE: case keyCode.ENTER: this._eventHandler(event); break; case keyCode.HOME: toFocus=this.headers[ 0 ]; break; case keyCode.END: toFocus=this.headers[ length - 1 ]; break; } if(toFocus){ $(event.target).attr("tabIndex", -1); $(toFocus).attr("tabIndex", 0); toFocus.focus(); event.preventDefault(); }}, _panelKeyDown: function(event){ if(event.keyCode===$.ui.keyCode.UP&&event.ctrlKey){ $(event.currentTarget).prev().focus(); }}, refresh: function(){ var options=this.options; this._processPanels(); if(( options.active===false&&options.collapsible===true)||!this.headers.length){ options.active=false; this.active=$(); }else if(options.active===false){ this._activate(0); }else if(this.active.length&&!$.contains(this.element[ 0 ], this.active[ 0 ])){ if(this.headers.length===this.headers.find(".ui-state-disabled").length){ options.active=false; this.active=$(); }else{ this._activate(Math.max(0, options.active - 1)); }}else{ options.active=this.headers.index(this.active); } this._destroyIcons(); this._refresh(); }, _processPanels: function(){ var prevHeaders=this.headers, prevPanels=this.panels; this.headers=this.element.find(this.options.header) .addClass("ui-accordion-header ui-state-default ui-corner-all"); this.panels=this.headers.next() .addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom") .filter(":not(.ui-accordion-content-active)") .hide(); if(prevPanels){ this._off(prevHeaders.not(this.headers)); this._off(prevPanels.not(this.panels)); }}, _refresh: function(){ var maxHeight, options=this.options, heightStyle=options.heightStyle, parent=this.element.parent(); this.active=this._findActive(options.active) .addClass("ui-accordion-header-active ui-state-active ui-corner-top") .removeClass("ui-corner-all"); this.active.next() .addClass("ui-accordion-content-active") .show(); this.headers .attr("role", "tab") .each(function(){ var header=$(this), headerId=header.uniqueId().attr("id"), panel=header.next(), panelId=panel.uniqueId().attr("id"); header.attr("aria-controls", panelId); panel.attr("aria-labelledby", headerId); }) .next() .attr("role", "tabpanel"); this.headers .not(this.active) .attr({ "aria-selected": "false", "aria-expanded": "false", tabIndex: -1 }) .next() .attr({ "aria-hidden": "true" }) .hide(); if(!this.active.length){ this.headers.eq(0).attr("tabIndex", 0); }else{ this.active.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }) .next() .attr({ "aria-hidden": "false" }); } this._createIcons(); this._setupEvents(options.event); if(heightStyle==="fill"){ maxHeight=parent.height(); this.element.siblings(":visible").each(function(){ var elem=$(this), position=elem.css("position"); if(position==="absolute"||position==="fixed"){ return; } maxHeight -=elem.outerHeight(true); }); this.headers.each(function(){ maxHeight -=$(this).outerHeight(true); }); this.headers.next() .each(function(){ $(this).height(Math.max(0, maxHeight - $(this).innerHeight() + $(this).height())); }) .css("overflow", "auto"); }else if(heightStyle==="auto"){ maxHeight=0; this.headers.next() .each(function(){ maxHeight=Math.max(maxHeight, $(this).css("height", "").height()); }) .height(maxHeight); }}, _activate: function(index){ var active=this._findActive(index)[ 0 ]; if(active===this.active[ 0 ]){ return; } active=active||this.active[ 0 ]; this._eventHandler({ target: active, currentTarget: active, preventDefault: $.noop }); }, _findActive: function(selector){ return typeof selector==="number" ? this.headers.eq(selector):$(); }, _setupEvents: function(event){ var events={ keydown: "_keydown" }; if(event){ $.each(event.split(" "), function(index, eventName){ events[ eventName ]="_eventHandler"; }); } this._off(this.headers.add(this.headers.next())); this._on(this.headers, events); this._on(this.headers.next(), { keydown: "_panelKeyDown" }); this._hoverable(this.headers); this._focusable(this.headers); }, _eventHandler: function(event){ var options=this.options, active=this.active, clicked=$(event.currentTarget), clickedIsActive=clicked[ 0 ]===active[ 0 ], collapsing=clickedIsActive&&options.collapsible, toShow=collapsing ? $():clicked.next(), toHide=active.next(), eventData={ oldHeader: active, oldPanel: toHide, newHeader: collapsing ? $():clicked, newPanel: toShow }; event.preventDefault(); if((clickedIsActive&&!options.collapsible) || (this._trigger("beforeActivate", event, eventData)===false)){ return; } options.active=collapsing ? false:this.headers.index(clicked); this.active=clickedIsActive ? $():clicked; this._toggle(eventData); active.removeClass("ui-accordion-header-active ui-state-active"); if(options.icons){ active.children(".ui-accordion-header-icon") .removeClass(options.icons.activeHeader) .addClass(options.icons.header); } if(!clickedIsActive){ clicked .removeClass("ui-corner-all") .addClass("ui-accordion-header-active ui-state-active ui-corner-top"); if(options.icons){ clicked.children(".ui-accordion-header-icon") .removeClass(options.icons.header) .addClass(options.icons.activeHeader); } clicked .next() .addClass("ui-accordion-content-active"); }}, _toggle: function(data){ var toShow=data.newPanel, toHide=this.prevShow.length ? this.prevShow:data.oldPanel; this.prevShow.add(this.prevHide).stop(true, true); this.prevShow=toShow; this.prevHide=toHide; if(this.options.animate){ this._animate(toShow, toHide, data); }else{ toHide.hide(); toShow.show(); this._toggleComplete(data); } toHide.attr({ "aria-hidden": "true" }); toHide.prev().attr({ "aria-selected": "false", "aria-expanded": "false" }); if(toShow.length&&toHide.length){ toHide.prev().attr({ "tabIndex": -1, "aria-expanded": "false" }); }else if(toShow.length){ this.headers.filter(function(){ return parseInt($(this).attr("tabIndex"), 10)===0; }) .attr("tabIndex", -1); } toShow .attr("aria-hidden", "false") .prev() .attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }); }, _animate: function(toShow, toHide, data){ var total, easing, duration, that=this, adjust=0, boxSizing=toShow.css("box-sizing"), down=toShow.length && (!toHide.length||(toShow.index() < toHide.index())), animate=this.options.animate||{}, options=down&&animate.down||animate, complete=function(){ that._toggleComplete(data); }; if(typeof options==="number"){ duration=options; } if(typeof options==="string"){ easing=options; } easing=easing||options.easing||animate.easing; duration=duration||options.duration||animate.duration; if(!toHide.length){ return toShow.animate(this.showProps, duration, easing, complete); } if(!toShow.length){ return toHide.animate(this.hideProps, duration, easing, complete); } total=toShow.show().outerHeight(); toHide.animate(this.hideProps, { duration: duration, easing: easing, step: function(now, fx){ fx.now=Math.round(now); }}); toShow .hide() .animate(this.showProps, { duration: duration, easing: easing, complete: complete, step: function(now, fx){ fx.now=Math.round(now); if(fx.prop!=="height"){ if(boxSizing==="content-box"){ adjust +=fx.now; }}else if(that.options.heightStyle!=="content"){ fx.now=Math.round(total - toHide.outerHeight() - adjust); adjust=0; }} }); }, _toggleComplete: function(data){ var toHide=data.oldPanel; toHide .removeClass("ui-accordion-content-active") .prev() .removeClass("ui-corner-top") .addClass("ui-corner-all"); if(toHide.length){ toHide.parent()[ 0 ].className=toHide.parent()[ 0 ].className; } this._trigger("activate", null, data); }}); var menu=$.widget("ui.menu", { version: "1.11.4", defaultElement: "